<?php

/**
 * LoginForm class.
 * LoginForm is the data structure for keeping
 * user login form data. It is used by the 'login' action of 'SiteController'.
 */
class ContactForm extends CFormModel {
	public $category;
	public $content;
	public $name;
	public $phone;
	public $email;
	public $verifyCode;
	public $isSent;

	/**
	 * Declares the validation rules.
	 * The rules state that username and password are required,
	 * and password needs to be authenticated.
	 */
	public function rules()
	{
		return array(
			// username and password are required
			array('content, name, email', 'required', 'message' => '请填写{attribute}。')
		);
	}

	/**
	 * Declares the attribute labels.
	 * If an attribute is not delcared here, it will use the default label
	 * generation algorithm to get its label.
	 */
	public function attributeLabels()
	{
		return array(
			'title' => '标题',
			'content' => '内容',
			'email' => '电子邮件',
			'name' => '姓名'
		);
	}
}
